// pages/dealerLogistics/dealerLogistics.js
var app = getApp()
Page({
  data: {
    list:[],
    number:"",
    expName:"",
    noRecord:true
  },
  onLoad: function (e) {
    var that = this;
    wx.hideShareMenu()
    var orderId = e.id;
    var numberId = e.number;
    if (app.globalData.iphone == true) { that.setData({ iphone: 'iphone' }) };
    wx.showLoading({
      title: '加载中',
    })
    app.get("/order/get_logistics_by_orderid?OrderId="+orderId,res=>{
      // console.log(res);
      wx.hideLoading()
      if(res&&res.code=="0"){
        if(res.result){
          let data=JSON.parse(res.result);
          console.log(data);
          if(data.msg=="ok"){
            if(data.result.hasOwnProperty("list")){
              console.log(data.result.list);
              this.setData({
                list:data.result.list,
                number:data.result.number,
                expName:data.result.expName,
                noRecord:false
              })
            }else{
              this.setData({
                noRecord:true
              })
            }
          }
        }
      }
    })
  },
})
